<script>
	export default {
		 globalData: {  
		            addressObj: null
		 },  
		onLaunch: function() {
		},
		onShow: function() {
			uni.getSystemInfo({
			  success (res) {
			    console.log(res.platform)
				uni.setStorageSync("platform",res.platform)
			  }
			});
		const updateManager = uni.getUpdateManager();
		updateManager.onCheckForUpdate((res)=>{
		  if(res.hasUpdate){
			  updateManager.onUpdateReady((res)=>{
			  	uni.showModal({
			  	    title: '更新提示',
			  	    content: '新版本已经准备好，是否重启应用？',
			  	    success(res) {
			  	      if (res.confirm) {
			  	        updateManager.applyUpdate();
			  	      }
			  	    }
			  	  })
			  })
		  }
		});
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style lang="scss">
	@import "uview-ui/index.scss";
	@import "/wxcomponents/vant/dist/common/index.wxss";
</style>
